package com.ruoyi.front.service.impl;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.front.domain.Evaluation;
import com.ruoyi.front.mapper.EvaluationMapper;
import com.ruoyi.front.service.EvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EvaluationServiceImpl implements EvaluationService {
    @Autowired
    private EvaluationMapper evaluationMapper;
    @Override
    public R list() {
        List<Evaluation> list = evaluationMapper.list();
        return R.ok(list,"评价列表获取成功");
    }

    @Override
    public R add(Evaluation evaluation) {
        evaluationMapper.add(evaluation);
        return R.ok(null,"新增评价成功");
    }
}
